/*
 *	ME2 C++ SDK
 *	Copyright (c) 2010 _silencer
 *
 *	Permission is hereby granted, free of charge, to any person
 *	obtaining a copy of this software and associated documentation
 *	files (the "Software"), to deal in the Software without
 *	restriction, including without limitation the rights to use,
 *	copy, modify, merge, publish, distribute, sublicense, and/or sell
 *	copies of the Software, and to permit persons to whom the
 *	Software is furnished to do so, subject to the following
 *	conditions:
 *
 *	The above copyright notice and this permission notice shall be
 *	included in all copies or substantial portions of the Software.
 *
 *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *	OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *	HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *	WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *	FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *	OTHER DEALINGS IN THE SOFTWARE.
 */

#ifndef UNREAL_BASE_H
#define UNREAL_BASE_H

#include "unreal_object.h"
#include "unreal_string.h"

namespace unreal
{
	#pragma pack(push)
	#pragma pack(1)

	class ucomponent: public uobject
	{
		DECLARE_CORE_CLASS( ucomponent, uobject, Component )

	public:

		uclass* get_template_owner_class() const
		{
			return template_owner_class_;
		}

		uname get_template_name() const
		{
			return template_name_;
		}

		void set_template_owner_class( uclass* template_owner_class )
		{
			template_owner_class_ = template_owner_class;
		}

		void set_template_name( const uname template_name )
		{
			template_name_ = template_name;
		}

	private:

		uclass* template_owner_class_;
		uname template_name_;
		uint32 unknown_;
	};

	class utextbuffer: public uobject
	{
		DECLARE_CORE_CLASS( utextbuffer, uobject, TextBuffer )

	public:

		int32 get_pos() const
		{
			return pos_;
		}

		int32 get_top() const
		{
			return top_;
		}

		ustring& get_text()
		{
			return text_;
		}

		void set_pos( const int32 pos )
		{
			pos_ = pos;
		}

		void set_top( const int32 top )
		{
			top_ = top;
		}

	private:

		void** unknown_vtable_;
		int32 pos_;
		int32 top_;
		ustring text_;
	};

	#pragma pack(pop)
}

#endif
